AnnieRoot.gresult=AnnieRoot.gresult||{};
gresult.PrizeListsShowCon=function(){
	var s = this;
	annie.Sprite.call(s);
	/*_a2x_need_start*//*_a2x_need_end*/
	annie.initRes(s,"gresult","PrizeListsShowCon");
	//your code here
	annie.globalDispatcher.addEventListener('updatePrizesSum', function (e) {
		var prizesData = e.data;
		if (prizesData) {
			s.removeAllChildren();
			var prizeLen = prizesData.length;
			for (var i = 0; i < prizeLen; i++) {
				var prizeList = new gresult.PrizeList();
				prizeList.id = i;
				prizeList.condition.text = prizesData[i].rule;
				trace(prizesData[i].name.length);
				prizeList.pname.text = prizesData[i].name;
				prizeList.psum.text = prizesData[i].sum;
				if (i < 3) {
					prizeList.y = 52 * i;
				} else {
					prizeList.y = 52 * i + 4;
					if (prizesData[i].name.length > 8) {
						prizeList.pname.y = 0;
					} else {
						prizeList.condition.y = 16;
						prizeList.psum.y = 16;
						prizeList.pname.y = 16;
					}
				}
				s.addChild(prizeList);
			}
		} else {
			trace('prizesData未定义:', prizesData);
		}
	})
};
A2xExtend(gresult.PrizeListsShowCon,annie.Sprite);
